% V20210224 - 11.1 GW_ADD_DIALOG_MESSAGE INCLUDE "GW.bas" % Create a page. p = GW_NEW_PAGE() % Prepare title bar string. Title$ = GW_ADD_BAR_TITLE$("DialogMessage Example") % Add title to page. GW_ADD_TITLEBAR(p,Title$) % Add descriptive text. GW_ADD_TEXT(p, "This is an example of the DIALOG_MESSAGE control:") % Add button to activate the dialog. GW_ADD_BUTTON(p, "Let's do this!", "show") % Let's prepare the dialog. ARRAY.LOAD a$[], "OK>done", "Not OK>cancel" Dlg = GW_ADD_DIALOG_MESSAGE(p, "My Dialog", "A message from our sponsor", a$[]) % Now show the page. GW_RENDER(p) DO % Wait for user action. r$ = GW_WAIT_ACTION$() % Place here any necessary code to process user actions. % Parse user action. SW.BEGIN r$ % Test for button press. SW.CASE "show" GW_SHOW_DIALOG(Dlg) SW.BREAK % Test for first dialog pick. SW.CASE "done" POPUP "OK was picked" SW.BREAK % Test for second dialog pick. SW.CASE "cancel" POPUP "Not OK was picked" SW.BREAK SW.END % End when BACK key is pressed. UNTIL r$ = "BACK" END "End of DialogMessage example."